#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H

#include <QtWidgets/QMainWindow>
#include <iostream>
#include <memory>

#include "module/rviz_visualization.h"
#include "node/image_visualization_node.h"
#include "node/sequence_task_node.h"
#include "ui_main_window.h"

namespace project_template {

/**
 * @brief Qt central, all operations relating to the view part here.
 */
class MainWindow : public QMainWindow {
  Q_OBJECT

 public:
  /**
   * @brief 构造函数
   * @param parent
   */
  MainWindow(QWidget* parent = 0);

  /**
   * @brief Destroy the Main Window object
   *
   */
  ~MainWindow();

  /**
   * @brief Rviz可视化初始化
   */
  void RvizVisualizationInit();

  /**
   * @brief 信号与槽连接
   */
  void SignalSlotConnection();

 private slots:
  /**
   * @brief RGB图像可视化
   * @param _image
   */
  void SlotRGBImageShow(QImage _image);

  /**
   * @brief 深度图像可视化
   * @param _image
   */
  void SlotDepthImageShow(QImage _image);

 signals:

 private:
  Ui::MainWindowDesign* ui;

  /// @brief 序列任务节点
  SequenceTaskNode* sequence_task_node_ = nullptr;
  /// @brief rviz地图可视化节点
  RvizVisualization* rviz_visualization_ = nullptr;

  /// @brief 图像可视化节点
  ImageVisualizationNode* image_visualization_node_ = nullptr;
};

}  // namespace project_template

#endif  // MAIN_WINDOW_H
